import request from '@/utils/request'

// 查询采购商信息列表
export function listPurchaser(query) {
  return request({
    url: '/system/purchaser/list',
    method: 'get',
    params: query
  })
}

// 查询采购商信息详细
export function getPurchaser(purchaserId) {
  return request({
    url: '/system/purchaser/' + purchaserId,
    method: 'get'
  })
}

// 新增采购商信息
export function addPurchaser(data) {
  return request({
    url: '/system/purchaser',
    method: 'post',
    data: data
  })
}

// 修改采购商信息
export function updatePurchaser(data) {
  return request({
    url: '/system/purchaser',
    method: 'put',
    data: data
  })
}

// 删除采购商信息
export function delPurchaser(purchaserId) {
  return request({
    url: '/system/purchaser/' + purchaserId,
    method: 'delete'
  })
}
